<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <a href="https:www.baidu.com">跳转</a>
  <div id="dingbu">
    <!-- <a href="#a01">11111111</a> -->
    <div onclick="jumpClick()" id="bottom1">回到底部</div>
  </div>
  <div id="a01">
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习</p>
<p>练习1111111111</p>
  </div>
    
  <a href="#a01">回到顶部</a>
  <!-- <div onclick="sssa()" id="top1">回到顶部</div> -->
</body>
<script type="text/javascript">
  function jumpClick(){

    document.querySelector('#top1').scrollIntoView({
      behavior: "smooth",
      block: "end",
      inline: "center" 
    })
  }
   function sssa() {

      document.querySelector('#bottom1').scrollIntoView(true)
    }
</script>
</html>